package com.desksoft.service;

import org.springframework.beans.factory.annotation.Autowired;

import com.desksoft.common.BaseServvice;
import com.desksoft.dao.UserDao;
import com.desksoft.entity.User;

/**
 * 用户service
 * @author forever
 *
 */
public class UserService extends BaseServvice {

	@Autowired
	private UserDao userDao;

	/**
	 * 用户注册
	 * @param u
	 */
	public void registerUser(User u){
		userDao.registerUser(u);
	}
	
	/**
	 * 用户登陆
	 * @param u
	 */
	public User loginUser(User u) {
		return userDao.loginUser(u);
	}
	
	/**
	 * 用户是否存在
	 * @param u
	 * @return
	 */
	public Integer isExistUser(User u){
		return userDao.isExistUser(u);
	}
	
	public UserDao getUserDao() {
		return userDao;
	}

	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	}
}
